import React from "react";
import {Icon, IconProps} from "./icon";
import {Meta, Story} from "@storybook/react/types-6-0";

// icon 必须要引入
import {library} from '@fortawesome/fontawesome-svg-core'
import {fas} from '@fortawesome/free-solid-svg-icons'
import {fab} from '@fortawesome/free-brands-svg-icons'
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";

library.add(fas, fab)


export default {
  title: 'Icon 图标',
  component: Icon,
} as Meta;


const Template: Story<IconProps> = (args) => <FontAwesomeIcon  {...args} />;
/**
 * safasfsa
 */
export const IconP = Template.bind({});
IconP.args = {
  size: "lg",
  icon: 'search'
};
export const IconBrands = Template.bind({});
IconBrands.storyName = "使用fab图标"

IconBrands.decorators = [(Story) => {
  return (
    <div>
      <Story/>
    </div>
  )
}]

IconBrands.args = {
  size: "lg",
  icon: ["fab", "apple"]
};

